from django.contrib import admin
from .models import *
# Register your models here.

@admin.register(Book)
class BookAdmin(admin.ModelAdmin):
    date_hierarchy = 'create_at'
    search_fields = ['sku', 'name']
    list_filter = ('top', 'sub')
    list_display = ('sku','name','top','sub','author', 'pub','pub_date','create_at', 'modify_at')
    readonly_fields = ('create_at','modify_at')